package other_其他模式.mvc_pattern_模型视图控制器模式;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hihi
 * @Date: 2020/07/10/10:24
 * @Description:
 */
public class MVCPatternDemo {
	public static void main(String[] args) {

		//获取一个模型
		Student zhangsan = new Student("zhangsan", "100");

		//创建视图

		StudentView studentView = new StudentView();

		//创建控制器
		StudentController studentController = new StudentController(zhangsan, studentView);

		//数据更新到视图
		studentController.updateView();

		zhangsan.setRollNo(200 + "");

		studentController.updateView();
	}
}
